package com.yanqu.road.entity.activity.hsisland.data;

public class HsIslandMonsterData {

    /**
     * monster id
     */
    private int monsterId;

    /**
     * 总血量
     */
    private long allBlood;

    /**
     * 掉血量
     */
    private long reBlood = 0;

    /**
     * 战场id
     */
    private long battleFieldId;

    /**
     * 怪物创建时间
     * 怪物攻击等待时间用这个字段判断
     */
    private long createTime;

    /**
     * 发现者id
     */
    private long findUserId;

    public HsIslandMonsterData() {

    }

    public HsIslandMonsterData(int monsterId, long allBlood, long battleFieldId) {
        this.monsterId = monsterId;
        this.allBlood = allBlood;
        this.battleFieldId = battleFieldId;
        this.createTime = System.currentTimeMillis();
    }

    public int getMonsterId() {
        return monsterId;
    }

    public void setMonsterId(int monsterId) {
        this.monsterId = monsterId;
    }

    public long getAllBlood() {
        return allBlood;
    }

    public void setAllBlood(long allBlood) {
        this.allBlood = allBlood;
    }

    public long getReBlood() {
        return reBlood;
    }

    public void setReBlood(long reBlood) {
        this.reBlood = reBlood;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getFindUserId() {
        return findUserId;
    }

    public void setFindUserId(long findUserId) {
        this.findUserId = findUserId;
    }

    /**
     * 获取血
     * @return
     */
    public long getBlood() {
        return this.allBlood - this.reBlood;
    }

    /**
     * 是否死亡
     * @return
     */
    public boolean isDead() {
        return this.reBlood >= this.allBlood;
    }

    public long getBattleFieldId() {
        return battleFieldId;
    }

    public void setBattleFieldId(long battleFieldId) {
        this.battleFieldId = battleFieldId;
    }

    public long getCreateTime() {
        return createTime;
    }
}
